home *** CD-ROM | disk | FTP | other *** search
/ Champak 146 / (Vol 146) Jan 07 2012.iso / Games / screamin_upstreamin.swf / scripts / DefineSprite_184 / frame_1 / PlaceObject3_75_37 / CLIPACTIONRECORD onClipEvent(enterFrame).as next >
Text File  |  2012-01-07  |  658b  |  25 lines

  1. onClipEvent(enterFrame){
  2.    if(_Y > 275)
  3.    {
  4.       this.gotoAndstop(1);
  5.    }
  6.    if(_Y >= occurrence)
  7.    {
  8.       var occurrence = Math.round(Math.random() * frequency) + 300;
  9.       var xPos = -110 + Math.round(Math.random() * xPosVara);
  10.       _Y = startPos;
  11.       _X = xPos;
  12.       _root.bigCarSpeed = 15;
  13.       hitObject = "on";
  14.    }
  15.    else if(_Y <= occurrence * -1)
  16.    {
  17.       var occurrence = Math.round(Math.random() * frequency) + 300;
  18.       var xPos = -110 + Math.round(Math.random() * xPosVara);
  19.       _Y = startPos * -1;
  20.       _X = xPos;
  21.       hitObject = "on";
  22.    }
  23.    _Y = _Y + (- _root.bigCarSpeed) + _root.busSpeed / 2;
  24. }
  25.